#include<stdio.h>
#define ROWS 100
#define COLS 200

int main()
{
	int n = 0, i = 0, j = 0;
	int arr[ROWS][COLS] = {0}; 
	scanf("%d", &n);
	for(i = 0; i < n; ++i)
	{
		for(j = 0; j < 2 * n - 1; ++j)
		{
			if(i + j == n - 1 || j - i == n -1)
			{
				arr[i][j] = 1;
			}
			else if(j > 0 && j < 2 * n - 2) //保证j - 1 和 j + 1有效
            {
                arr[i][j] = arr[i - 1][j -1] + arr[i - 1][j +1];
            }
		}	
	}
	for(i = 0; i < n; ++i)
	{
		for(j = 0; j < 2 * n - 1; ++j)
		{
			if(arr[i][j] != 0)
			{
				printf("%2d",arr[i][j]);
			}
			else
			{
				printf("  ");
			}				
		}
		printf("\n");	
	}
	return 0;
}

